<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
					xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:DatePickerControls="clr-namespace:VMukti.CtlDatePicker.Presentation"
          >

  	<PathGeometry x:Key="geometry" Figures="M0,0 4.5,4 9,0 5.5,0 4.5,1 3.5,0z"/>

  <!-- Month Calendar -->
 <LinearGradientBrush x:Key="NormalBorderBrush" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#CCC" Offset="0.0"/>
			<GradientStop Color="#444" Offset="1.0"/>
		</LinearGradientBrush>

		<!-- NormalBrush is used as the Background for SimpleButton, SimpleRepeatButton -->
		<LinearGradientBrush x:Key="NormalBrush" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#FFDDDDDD" Offset="0.0"/>
			<GradientStop Color="#FF999999" Offset="0.1"/>
			<GradientStop Color="#FF565656" Offset="0.3"/>
			<GradientStop Color="#FF121212" Offset="1.0"/>
		</LinearGradientBrush>
		
		<LinearGradientBrush x:Key="NormalBrush1" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#FFDDDDDD" Offset="0.0"/>
			<GradientStop Color="#FF999999" Offset="1.0"/>
		</LinearGradientBrush>
		
		<!-- PressedBrush is used for Pressed in Button, Radio Button, CheckBox -->
		<LinearGradientBrush x:Key="PressedBrush" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#BBB" Offset="0.0"/>
			<GradientStop Color="#FFC4C2C2" Offset="0.1"/>
			<GradientStop Color="#FFAFAAAA" Offset="0.9"/>
			<GradientStop Color="#FFB2AFAF" Offset="1.0"/>
		</LinearGradientBrush>

		<!-- LightBrush is used for content areas such as Menu, Tab Control background -->
		<LinearGradientBrush x:Key="LightBrush" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#FFFFFFFF" Offset="0.0"/>
			<GradientStop Color="#FFEDEDED" Offset="1.0"/>
		</LinearGradientBrush>
		
		<LinearGradientBrush x:Key="LightBrushDark" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#FFFFFFFF" Offset="0.0"/>
			<GradientStop Color="#FFA39C9C" Offset="1.0"/>
		</LinearGradientBrush>
		<!-- MouseOverBrush is used for MouseOver in Button, Radio Button, CheckBox -->
		<LinearGradientBrush x:Key="MouseOverBrush" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#FFF7F3F3" Offset="0.0"/>
			<GradientStop Color="#FF3D3B3B" Offset="1.0"/>
		</LinearGradientBrush>

		<LinearGradientBrush x:Key="PressedBorderBrush" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#444" Offset="0.0"/>
			<GradientStop Color="#FF545454" Offset="1.0"/>
		</LinearGradientBrush>

		<!-- Disabled Brushes are used for the Disabled look of each control -->
		<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#FF585757"/>

		<!-- SelectedBackgroundBrush is used for the Selected item in ListBoxItem, ComboBoxItem-->
		<SolidColorBrush x:Key="SelectedBackgroundBrush" Color="#FF8F8989"/>

		<SolidColorBrush x:Key="DisabledBorderBrush" Color="#FF9B9696"/>

		<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#FFB8B8B8"/>

		<!-- Used for background of ScrollViewer, TreeView, ListBox, Expander, TextBox, Tab Control -->
		<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FF9B9696"/>

		<!-- DefaultedBorderBrush is used to show KeyBoardFocus -->
		<LinearGradientBrush x:Key="DefaultedBorderBrush" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#777" Offset="0.0"/>
			<GradientStop Color="#000" Offset="1.0"/>
		</LinearGradientBrush>

		<SolidColorBrush x:Key="SolidBorderBrush" Color="#FF313030"/>
		<SolidColorBrush x:Key="LightColorBrush" Color="#FFB1B1B1"/>

		<SolidColorBrush x:Key="LightBorderBrush" Color="#FFAFADAD"/>	
		
		
			
  <LinearGradientBrush x:Key="MonthCalendarButtonFillNormal" StartPoint="0,0" EndPoint="1,1">
  	<GradientStop Color="#FF959595" Offset="0.005"/>
  	<GradientStop Color="#FF767676" Offset="0.3"/>
  	<GradientStop Color="#FF5C5C5C" Offset="0.6"/>
  	<GradientStop Color="#FF767676" Offset="1"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="MonthCalendarButtonFillHover" StartPoint="0, 0" EndPoint="1, 1">
  	<GradientStop Color="#FFFFFFFF" Offset="0"/>
  	<GradientStop Color="#FFCCCCCC" Offset="0.6"/>
  	<GradientStop Color="#FFFDFDFD" Offset="1"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="MonthCalendarButtonFillPressed" StartPoint="0, 0" EndPoint="1, 1">
  	<GradientStop Color="#FF606060" Offset="0"/>
  	<GradientStop Color="#FF585858" Offset="0.3"/>
  	<GradientStop Color="#FF8F8F8F" Offset="0.7"/>
  	<GradientStop Color="#FFD2D2D2" Offset="1.0"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="MonthCalendarButtonFillDisabled" StartPoint="0, 0" EndPoint="1, 1">
    <LinearGradientBrush.GradientStops>
      <GradientStop Color="#FFF7F7F7" Offset="0"/>
      <GradientStop Color="#FFF0F0F0" Offset="0.3"/>
      <GradientStop Color="#FFECECEC" Offset="0.6"/>
      <GradientStop Color="#FFE3E3E3" Offset="1.0"/>
    </LinearGradientBrush.GradientStops>
  </LinearGradientBrush>

  <Pen x:Key="MonthCalendarButtonInnerBorderNormal" Brush="#FFCECECE" Thickness="1"/>
  <Pen x:Key="MonthCalendarButtonInnerBorderPressed" Brush="#FF838FDA" Thickness="1"/>
  <Pen x:Key="MonthCalendarButtonInnerBorderHover" Brush="#FFDCDCDC" Thickness="1"/>
  <Pen x:Key="MonthCalendarButtonInnerBorderDisabled" Brush="#FF7E7E7E" Thickness="1"/>

  <Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type DatePickerControls:MonthCalendar},ResourceId=PreviousButtonStyleKey}" TargetType="{x:Type ButtonBase}">
    <Setter Property="Width" Value="16" />
    <Setter Property="Height" Value="16" />
    <Setter Property="Background" Value="{StaticResource MonthCalendarButtonFillNormal}" />
    <Setter Property="Foreground" Value="#FF4D6185"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>

  <Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type DatePickerControls:MonthCalendar},ResourceId=NextButtonStyleKey}" TargetType="{x:Type ButtonBase}">
    <Setter Property="Width" Value="16" />
    <Setter Property="Height" Value="16" />
    <Setter Property="Background" Value="{StaticResource MonthCalendarButtonFillNormal}" />
    <Setter Property="Foreground" Value="#FF4D6185"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="VerticalAlignment" Value="Top"/>
  </Style>

  <!--MonthCalendar Group Style-->
  <DatePickerControls:WeekNumberConverter x:Key="MonthCalendarWeekNumberConverter" />
  <DatePickerControls:DayHeaderConverter x:Key="MonthCalendarDayHeaderConverter" />
  <DatePickerControls:AbbreviatedDayNameConverter x:Key="MonthCalendarAbbreviatedDayNameConverter" />
  <DatePickerControls:MonthYearHeaderConverter x:Key="MonthCalendarMonthYearHeaderConverter" />




  <Style x:Key="{x:Type DatePickerControls:MonthCalendar}" TargetType="{x:Type DatePickerControls:MonthCalendar}">
    <Setter Property="Background" Value="{StaticResource LightBrush}" />
    <Setter Property="BorderBrush" Value="{StaticResource NormalBorderBrush}" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.MessageFontFamilyKey}}" />
    <Setter Property="FontSize" Value="{DynamicResource {x:Static SystemFonts.MessageFontSizeKey}}" />
    <Setter Property="FontStyle" Value="{DynamicResource {x:Static SystemFonts.MessageFontStyleKey}}" />
    <Setter Property="FontWeight" Value="{DynamicResource {x:Static SystemFonts.MessageFontWeightKey}}" />
    <Setter Property="Foreground" Value="{StaticResource NormalBrush}" />
    <Setter Property="Padding" Value="1" />
    <Setter Property="Grid.IsSharedSizeScope" Value="true" />
    <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
    <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
    <Setter Property="FocusManager.IsFocusScope" Value="true"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type DatePickerControls:MonthCalendar}">
          <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}">
            <ScrollViewer Focusable="false">
              <Grid>
                <Grid.RowDefinitions>
                  <RowDefinition Height="Auto"/>
                  <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid x:Name="Title">
                  <DatePickerControls:MonthCalendarTitle x:Name="TitleHost" DataContext="{TemplateBinding VisibleMonth}" Style="{TemplateBinding TitleStyle}"/>
                  <RepeatButton x:Name="PART_PreviousButton" Command="DatePickerControls:MonthCalendar.PreviousCommand"
                      Margin="7 5 0 0" HorizontalAlignment="Left" Background ="{StaticResource NormalBorderBrush}" >
                    <Viewbox>
                      <Path Data="{StaticResource geometry}" Fill="{StaticResource LightBrush}">
                        <Path.LayoutTransform>
                          <RotateTransform Angle="90"/>
                        </Path.LayoutTransform>
                      </Path>
                    </Viewbox>
                  </RepeatButton>
                  <RepeatButton x:Name="PART_NextButton" Command="DatePickerControls:MonthCalendar.NextCommand"
                      Margin="0 5 7 0" HorizontalAlignment="Right" Background ="{StaticResource NormalBorderBrush}">
                    <Viewbox>
                      <Path Data="{StaticResource geometry}" Fill="{StaticResource LightBrush}">
                        <Path.LayoutTransform>
                          <RotateTransform Angle="-90"/>
                        </Path.LayoutTransform>
                      </Path>
                    </Viewbox>
                  </RepeatButton>
                </Grid>
                <Grid Grid.Row="1">
                  <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition/>
                  </Grid.RowDefinitions>
                  <Grid x:Name="DayHeaders" Grid.Column="1">
                    <Grid.ColumnDefinitions>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                      <ColumnDefinition/>
                    </Grid.ColumnDefinitions>
                    <DatePickerControls:MonthCalendarDayHeader Grid.Column="0" Style="{TemplateBinding DayHeaderStyle}"
                                    DataContext="{Binding Path=FirstDayOfWeek,Mode=OneWay,Converter={StaticResource MonthCalendarDayHeaderConverter},ConverterParameter=0,RelativeSource={RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}}"/>
                    <DatePickerControls:MonthCalendarDayHeader Grid.Column="1" Style="{TemplateBinding DayHeaderStyle}"
                                    DataContext="{Binding Path=FirstDayOfWeek,Mode=OneWay,Converter={StaticResource MonthCalendarDayHeaderConverter},ConverterParameter=1, RelativeSource={RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}}"/>
                    <DatePickerControls:MonthCalendarDayHeader Grid.Column="2" Style="{TemplateBinding DayHeaderStyle}"
                                    DataContext="{Binding Path=FirstDayOfWeek,Mode=OneWay,Converter={StaticResource MonthCalendarDayHeaderConverter},ConverterParameter=2, RelativeSource={RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}}"/>
                    <DatePickerControls:MonthCalendarDayHeader Grid.Column="3" Style="{TemplateBinding DayHeaderStyle}"
                                    DataContext="{Binding Path=FirstDayOfWeek,Mode=OneWay,Converter={StaticResource MonthCalendarDayHeaderConverter},ConverterParameter=3, RelativeSource={RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}}"/>
                    <DatePickerControls:MonthCalendarDayHeader Grid.Column="4" Style="{TemplateBinding DayHeaderStyle}"
                                    DataContext="{Binding Path=FirstDayOfWeek,Mode=OneWay,Converter={StaticResource MonthCalendarDayHeaderConverter},ConverterParameter=4, RelativeSource={RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}}"/>
                    <DatePickerControls:MonthCalendarDayHeader Grid.Column="5" Style="{TemplateBinding DayHeaderStyle}"
                                    DataContext="{Binding Path=FirstDayOfWeek,Mode=OneWay,Converter={StaticResource MonthCalendarDayHeaderConverter},ConverterParameter=5, RelativeSource={RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}}"/>
                    <DatePickerControls:MonthCalendarDayHeader Grid.Column="6" Style="{TemplateBinding DayHeaderStyle}"
                                    DataContext="{Binding Path=FirstDayOfWeek,Mode=OneWay,Converter={StaticResource MonthCalendarDayHeaderConverter},ConverterParameter=6, RelativeSource={RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}}"/>
                  </Grid>
                  <Rectangle x:Name="DayHeadersSplitLine" Grid.Column="1" Fill="Black" Height="1" VerticalAlignment="Bottom" Margin="2,0,2,0"/>
                  <Grid x:Name="WeekNumbers" Grid.Row="1" MinWidth="20" Visibility="Collapsed" >
                    <Grid.RowDefinitions>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                      <RowDefinition/>
                    </Grid.RowDefinitions>
                    <DatePickerControls:MonthCalendarWeekNumber Grid.Row="0" Style="{TemplateBinding WeekNumberStyle}">
                      <Control.DataContext>
                        <MultiBinding Mode="OneWay" Converter="{StaticResource MonthCalendarWeekNumberConverter}" ConverterParameter="0">
                          <Binding Path="FirstDayOfWeek" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                          <Binding Path="VisibleMonth" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                        </MultiBinding>
                      </Control.DataContext>
                    </DatePickerControls:MonthCalendarWeekNumber>
                    <DatePickerControls:MonthCalendarWeekNumber Grid.Row="1" Style="{TemplateBinding WeekNumberStyle}">
                      <Control.DataContext>
                        <MultiBinding Mode="OneWay" Converter="{StaticResource MonthCalendarWeekNumberConverter}" ConverterParameter="1">
                          <Binding Path="FirstDayOfWeek" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                          <Binding Path="VisibleMonth" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                        </MultiBinding>
                      </Control.DataContext>
                    </DatePickerControls:MonthCalendarWeekNumber>
                    <DatePickerControls:MonthCalendarWeekNumber Grid.Row="2" Style="{TemplateBinding WeekNumberStyle}">
                      <Control.DataContext>
                        <MultiBinding Mode="OneWay" Converter="{StaticResource MonthCalendarWeekNumberConverter}" ConverterParameter="2">
                          <Binding Path="FirstDayOfWeek" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                          <Binding Path="VisibleMonth" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                        </MultiBinding>
                      </Control.DataContext>
                    </DatePickerControls:MonthCalendarWeekNumber>
                    <DatePickerControls:MonthCalendarWeekNumber Grid.Row="3" Style="{TemplateBinding WeekNumberStyle}">
                      <Control.DataContext>
                        <MultiBinding Mode="OneWay" Converter="{StaticResource MonthCalendarWeekNumberConverter}" ConverterParameter="3">
                          <Binding Path="FirstDayOfWeek" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                          <Binding Path="VisibleMonth" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                        </MultiBinding>
                      </Control.DataContext>
                    </DatePickerControls:MonthCalendarWeekNumber>
                    <DatePickerControls:MonthCalendarWeekNumber Grid.Row="4" Style="{TemplateBinding WeekNumberStyle}">
                      <Control.DataContext>
                        <MultiBinding Mode="OneWay" Converter="{StaticResource MonthCalendarWeekNumberConverter}" ConverterParameter="4">
                          <Binding Path="FirstDayOfWeek" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                          <Binding Path="VisibleMonth" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                        </MultiBinding>
                      </Control.DataContext>
                    </DatePickerControls:MonthCalendarWeekNumber>
                    <DatePickerControls:MonthCalendarWeekNumber Grid.Row="5" Style="{TemplateBinding WeekNumberStyle}">
                      <Control.DataContext>
                        <MultiBinding Mode="OneWay" Converter="{StaticResource MonthCalendarWeekNumberConverter}" ConverterParameter="5">
                          <Binding Path="FirstDayOfWeek" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                          <Binding Path="VisibleMonth" RelativeSource="{RelativeSource AncestorType={x:Type DatePickerControls:MonthCalendar}}"/>
                        </MultiBinding>
                      </Control.DataContext>
                    </DatePickerControls:MonthCalendarWeekNumber>
                  </Grid>
                  <Rectangle x:Name="WeekNumbersSplitLine" Grid.Row="1" Fill="Black" Width="1" HorizontalAlignment="Right" Margin="0,2,0,2" Visibility="Collapsed"/>
                  <DatePickerControls:MonthCalendarContainer x:Name="PART_VisibleDaysHost" 
                      Grid.Row="1" Grid.Column="1"
                      ScrollViewer.HorizontalScrollBarVisibility="Hidden" 
                      ScrollViewer.VerticalScrollBarVisibility="Hidden" 
                      BorderThickness="0" SelectionMode="Extended" IsTextSearchEnabled="false" 
                      ItemContainerStyle="{TemplateBinding DayContainerStyle}" ItemContainerStyleSelector="{TemplateBinding DayContainerStyleSelector}" 
                      Background="{TemplateBinding Background}" Foreground="{TemplateBinding Foreground}" FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" FocusVisualStyle="{TemplateBinding FocusVisualStyle}" Padding="{TemplateBinding Padding}">
                    <ListBox.ItemsPanel>
                      <ItemsPanelTemplate>
                        <UniformGrid Columns="7" Rows="6" />
                      </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                  </DatePickerControls:MonthCalendarContainer>
                </Grid>
              </Grid>
            </ScrollViewer>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="ShowsTitle" Value="false">
              <Setter Property="Visibility" Value="Collapsed" TargetName="Title"/>
            </Trigger>
            <Trigger Property="ShowsDayHeaders" Value="false">
              <Setter Property="Visibility" Value="Collapsed" TargetName="DayHeaders"/>
              <Setter Property="Visibility" Value="Collapsed" TargetName="DayHeadersSplitLine"/>
            </Trigger>
            <Trigger Property="ShowsWeekNumbers" Value="true">
              <Setter Property="Visibility" Value="Visible" TargetName="WeekNumbers"/>
              <Setter Property="Visibility" Value="Visible" TargetName="WeekNumbersSplitLine"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}" />
      </Trigger>
    </Style.Triggers>
  </Style>

  <Style x:Key="{x:Type DatePickerControls:MonthCalendarItem}" TargetType="{x:Type DatePickerControls:MonthCalendarItem}">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="4,1,4,1" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="BorderBrush" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type DatePickerControls:MonthCalendarItem}">
          <Border x:Name="Bd" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsSelected"
                     Value="true">
              <Setter TargetName="Bd"
                      Property="Background"
                      Value="{StaticResource NormalBrush}"/>
              <Setter Property="Foreground"
                      Value="{StaticResource LightBrush}"/>
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsSelected"
                           Value="true"/>
                <Condition Property="Selector.IsSelectionActive"
                           Value="false"/>
              </MultiTrigger.Conditions>
              <Setter TargetName="Bd"
                      Property="Background"
                      Value="{StaticResource NormalBrush}"/>
              <Setter Property="Foreground"
                      Value="{StaticResource LightBrush}"/>
            </MultiTrigger>
            <Trigger Property="IsEnabled"
                     Value="false">
              <Setter Property="Foreground"
                      Value="{StaticResource DisabledForegroundBrush}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <DataTrigger Binding="{Binding IsOtherMonth}" Value="true">
        <Setter Property="Foreground" Value="{StaticResource NormalBrush1}"/> <!---->
      </DataTrigger>
      <DataTrigger Binding="{Binding IsSelectable}" Value="false">
        <Setter Property="IsEnabled" Value="false"/>
      </DataTrigger>
      <DataTrigger Binding="{Binding IsToday}" Value="true">
        <Setter Property="BorderBrush" Value="Black"/>
      </DataTrigger>
    </Style.Triggers>
  </Style>

  <Style x:Key="{x:Type DatePickerControls:MonthCalendarTitle}" TargetType="{x:Type DatePickerControls:MonthCalendarTitle}">
    <Setter Property="Background" Value="{StaticResource LightBrushDark}"/>
    <Setter Property="Foreground" Value="Black"/>
    <Setter Property="FontWeight" Value="Bold"/>
    <Setter Property="Padding" Value="8"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="HorizontalContentAlignment" Value="Center"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type DatePickerControls:MonthCalendarTitle}">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
            <TextBlock Text="{Binding Converter={StaticResource MonthCalendarMonthYearHeaderConverter}}" 
                FontFamily="{TemplateBinding FontFamily}" FontSize="{TemplateBinding FontSize}" FontStretch="{TemplateBinding FontStretch}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" 
                HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 
                Margin="{TemplateBinding Padding}" Foreground="{TemplateBinding Foreground}"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <Style x:Key="{x:Type DatePickerControls:MonthCalendarDayHeader}" TargetType="{x:Type DatePickerControls:MonthCalendarDayHeader}">
    <Setter Property="HorizontalContentAlignment" Value="Center" />
    <Setter Property="Padding" Value="4, 1, 4, 1" />
    <Setter Property="Foreground" Value="#FF0054E3"/>
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type DatePickerControls:MonthCalendarDayHeader}">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
            <TextBlock Text="{Binding Converter={StaticResource MonthCalendarAbbreviatedDayNameConverter}}" />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <Style x:Key="{x:Type DatePickerControls:MonthCalendarWeekNumber}" TargetType="{x:Type DatePickerControls:MonthCalendarWeekNumber}">
    <Setter Property="HorizontalAlignment" Value="Right" />
    <Setter Property="VerticalAlignment" Value="Center" />
    <Setter Property="Padding" Value="4, 1, 4, 1" />
    <Setter Property="Foreground" Value="Red" />
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type DatePickerControls:MonthCalendarWeekNumber}">
          <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
            <TextBlock Text="{Binding}" />
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Style.Triggers>
      <Trigger Property="IsEnabled" Value="false">
        <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
      </Trigger>
    </Style.Triggers>
  </Style>

  <!-- DatePicker -->
 <SolidColorBrush x:Key="ListBorder" Color="#FFE9E9E9"/>

  <Style x:Key="DatePickerFocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Border>
            <Rectangle Margin="4,4,21,4" StrokeThickness="1" Stroke="Black" StrokeDashArray="1 2"/>
          </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <LinearGradientBrush x:Key="ScrollBarButtonFillNormal" StartPoint="0,0" EndPoint="1,1">
 	<GradientStop Color="#FFFFFFFF" Offset="0"/>
 	<GradientStop Color="#FFEBECEF" Offset="0.3"/>
 	<GradientStop Color="#FFC4C4C4" Offset="0.6"/>
 	<GradientStop Color="#FFA5A5A5" Offset="1"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ScrollBarButtonFillHover" StartPoint="0, 0" EndPoint="1, 1">
  	<GradientStop Color="#FFE0E0E0" Offset="0"/>
  	<GradientStop Color="#FFFFFFFF" Offset="0.6"/>
  	<GradientStop Color="#FFD4D4D4" Offset="1"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ScrollBarButtonFillPressed" StartPoint="0, 0" EndPoint="1, 1">
  	<GradientStop Color="#FFA9A9A9" Offset="0"/>
  	<GradientStop Color="#FFA9A9A9" Offset="0.3"/>
  	<GradientStop Color="#FFC6C7C8" Offset="0.7"/>
  	<GradientStop Color="#FFF3F3F3" Offset="1.0"/>
  </LinearGradientBrush>
  <LinearGradientBrush x:Key="ScrollBarButtonFillDisabled" StartPoint="0, 0" EndPoint="1, 1">
    <LinearGradientBrush.GradientStops>
      <GradientStop Color="#FFF7F7F7" Offset="0"/>
      <GradientStop Color="#FFF0F0F0" Offset="0.3"/>
      <GradientStop Color="#FFECECEC" Offset="0.6"/>
      <GradientStop Color="#FFE3E3E3" Offset="1.0"/>
    </LinearGradientBrush.GradientStops>
  </LinearGradientBrush>
  <Pen x:Key="ScrollBarButtonOuterBorder" Brush="White" Thickness="1"/>
  <Pen x:Key="ScrollBarButtonInnerBorderNormal" Brush="#FFB2B2B2" Thickness="1"/>
  <Pen x:Key="ScrollBarButtonInnerBorderHover" Brush="#FF8D8D8D" Thickness="1"/>
  <Pen x:Key="ScrollBarButtonInnerBorderPressed" Brush="#FF5E5E5E" Thickness="1"/>
  <Pen x:Key="ScrollBarButtonInnerBorderDisabled" Brush="#FFE8E8DF" Thickness="1"/>

  <Style x:Key="DatePickerEditableTextBox" TargetType="{x:Type TextBox}">
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="AllowDrop" Value="true"/>
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
    <Setter Property="MinWidth" Value="0"/>
    <Setter Property="MinHeight" Value="0"/>
    <Setter Property="Width" Value="Auto"/>
    <Setter Property="Height" Value="Auto"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type TextBox}">
          <ScrollViewer x:Name="PART_ContentHost"
                        Focusable="false"
                        HorizontalScrollBarVisibility="Hidden"
                        VerticalScrollBarVisibility="Hidden"
                        Background="{TemplateBinding Background}">
          </ScrollViewer>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  
  <Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type DatePickerControls:DatePicker},ResourceId=DropDownButtonStyleKey}" TargetType="{x:Type ToggleButton}">
    <Setter Property="Focusable" Value="false"/>
    <Setter Property="ClickMode" Value="Press"/>
    <Setter Property="Background" Value="{StaticResource NormalBorderBrush}"/>
    <!--<Style.Resources>
		
    <ControlTemplate TargetType="{x:Type ToggleButton}">
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition/>
					<ColumnDefinition Width="20"/>
				</Grid.ColumnDefinitions>
				<Rectangle Grid.ColumnSpan="2" HorizontalAlignment="Stretch" x:Name="Rectangle" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="5" RadiusY="5" Fill="{DynamicResource NormalBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
				<Rectangle Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto" RadiusX="5" RadiusY="5" Fill="{DynamicResource WindowBackgroundBrush}" Stroke="{DynamicResource NormalBorderBrush}"/>
				<Path Grid.Column="1" HorizontalAlignment="Center" x:Name="Arrow" VerticalAlignment="Center" Fill="{DynamicResource GlyphBrush}" Data="M 0 0 L 4 4 L 8 0 Z"/>
			</Grid>
			<ControlTemplate.Triggers>
				<Trigger Property="IsMouseOver" Value="true">
					<Setter Property="Fill" Value="{DynamicResource MouseOverBrush}" TargetName="Rectangle"/>
				</Trigger>
				<Trigger Property="IsChecked" Value="true">
					<Setter Property="Fill" Value="{DynamicResource PressedBrush}" TargetName="Rectangle"/>
				</Trigger>
				<Trigger Property="IsEnabled" Value="False">
					<Setter Property="Fill" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Rectangle"/>
					<Setter Property="Stroke" Value="{DynamicResource DisabledBorderBrush}" TargetName="Rectangle"/>
					<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
					<Setter Property="Fill" Value="{DynamicResource DisabledForegroundBrush}" TargetName="Arrow"/>
				</Trigger>
			</ControlTemplate.Triggers>
		</ControlTemplate>
	</Style.Resources>-->
<!--  
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">
          <Grid Background="{TemplateBinding Background}">
            <Viewbox Width="10" Height="10">
              <Path Data="{StaticResource geometry}" Fill="Black"/>
            </Viewbox>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>-->
  </Style>

  <Style x:Key="fakeButtonStyle" TargetType="{x:Type ToggleButton}">
    <Setter Property="Background" Value="Transparent"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ToggleButton}">
          <Border Background="{TemplateBinding Background}"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="SimpleRepeatButton" TargetType="{x:Type RepeatButton}" BasedOn="{x:Null}">
			<Setter Property="Background" Value="{DynamicResource NormalBrush1}"/>
			<Setter Property="BorderBrush" Value="{DynamicResource LightBrush}"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type RepeatButton}">
						<Grid>
							<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,1"/> <!--{TemplateBinding BorderThickness}-->
							<ContentPresenter HorizontalAlignment="Center" x:Name="ContentPresenter" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}" ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"/>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="IsKeyboardFocused" Value="true">
								<Setter Property="BorderBrush" Value="{DynamicResource DefaultedBorderBrush}" TargetName="Border"/>
							</Trigger>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Background" Value="{DynamicResource MouseOverBrush}" TargetName="Border"/>
							</Trigger>
							<Trigger Property="IsPressed" Value="true">
								<Setter Property="Background" Value="{DynamicResource PressedBrush}" TargetName="Border"/>
								<Setter Property="BorderBrush" Value="{DynamicResource PressedBorderBrush}" TargetName="Border"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Background" Value="{DynamicResource DisabledBackgroundBrush}" TargetName="Border"/>
								<Setter Property="BorderBrush" Value="{DynamicResource DisabledBorderBrush}" TargetName="Border"/>
								<Setter Property="Foreground" Value="{DynamicResource DisabledForegroundBrush}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>


  <Style x:Key="{x:Type DatePickerControls:DatePicker}" TargetType="{x:Type DatePickerControls:DatePicker}">
    <Setter Property="FocusVisualStyle" Value="{StaticResource DatePickerFocusVisual}"/>
    <Setter Property="Foreground" Value="{StaticResource NormalBrush}"/>
    <Setter Property="Background" Value="{StaticResource LightBrushDark}"/>
    <Setter Property="BorderBrush" Value="{StaticResource ListBorder}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="1"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type DatePickerControls:DatePicker}">
          <Grid>
            <Border Background="{TemplateBinding Background}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    Padding="1">
              <Grid Grid.IsSharedSizeScope="true">
                <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="1"/>
                  <ColumnDefinition Width="*"/>
                  <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Border x:Name="SelectedItemBorder" Grid.ColumnSpan="2" Margin="{TemplateBinding Padding}"/>
                <TextBlock x:Name="UnEditableSite" Grid.Column="1" 
                           VerticalAlignment="Center" 
                           Text="{TemplateBinding Text}" />
                <TextBox x:Name="PART_EditableTextBox" Grid.Column="1" 
                         Style="{StaticResource DatePickerEditableTextBox}" 
                         Visibility="Collapsed" 
                         IsReadOnly="{Binding Path=IsReadOnly,RelativeSource={RelativeSource TemplatedParent}}" 
                         Margin="{TemplateBinding Padding}" />
                <ToggleButton x:Name="FakeDropDownButton" Grid.ColumnSpan="2" 
                              Focusable="false" Style="{StaticResource fakeButtonStyle}"
                              IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}"/>
                              <!----> 
                <Border Grid.Column="2" >
                    <ToggleButton x:Name="PART_DropDownButton" IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}">
                    <Viewbox Width="10" Height="10">
						<Path Data="{StaticResource geometry}" Fill="{StaticResource LightBrush}"/>
                    </Viewbox>
                  </ToggleButton>
                </Border>
              </Grid>
            </Border>
            <Popup Name="PART_Popup" AllowsTransparency="true" 
                   Placement="Bottom" Focusable="false"
                   IsOpen="{Binding Path=IsDropDownOpen,RelativeSource={RelativeSource TemplatedParent}}">
              <Border x:Name="DropDownBorder"
                      Background="{StaticResource LightBrushDark}" 
                      BorderThickness="1"
                      BorderBrush="{StaticResource NormalBorderBrush}"><!--"{TemplateBinding Background}"-->
                <DatePickerControls:MonthCalendar x:Name="PART_DatePickerCalendar" MaxSelectionCount="1" Style="{TemplateBinding MonthCalendarStyle}"
                                   MaxDate="{TemplateBinding MaxDate}"
                                   MinDate="{TemplateBinding MinDate}"/>
              </Border>
            </Popup>
          </Grid>
          <ControlTemplate.Triggers>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="true" />
                <Condition Property="IsDropDownOpen" Value="false" />
                <Condition Property="CanEdit" Value="false" />
              </MultiTrigger.Conditions>
              <Setter TargetName="SelectedItemBorder" Property="Background" Value="{StaticResource LightBrushDark}" />
            </MultiTrigger>
            <Trigger Property="CanEdit" Value="true">
              <Setter TargetName="FakeDropDownButton" Property="Background" Value="{x:Null}"/>
              <Setter TargetName="SelectedItemBorder" Property="Visibility" Value="Collapsed" />
              <Setter TargetName="UnEditableSite" Property="Visibility" Value="Collapsed" />
              <Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" />
            </Trigger>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsKeyboardFocusWithin" Value="true" />
                <Condition Property="IsDropDownOpen" Value="false" />
                <Condition Property="CanEdit" Value="false" />
              </MultiTrigger.Conditions>
              <Setter TargetName="UnEditableSite" Property="Foreground" Value="{StaticResource NormalBrush}" />
            </MultiTrigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Foreground" Value="{StaticResource DisabledForegroundBrush}"/>
              <Setter Property="Background" Value="{StaticResource DisabledBackgroundBrush}"/>
            </Trigger>
            <Trigger Property="Width" Value="Auto">
              <Setter Property="MinWidth" Value="150"/>
            </Trigger>
            <Trigger Property="Height" Value="Auto">
              <Setter Property="MinHeight" Value="20"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>